<html>
<head>
<style>
A
{

	text-decoration: none; color: 003265;
}

A:hover
{

	text-decoration: underline; color: 000000;
}


td, body, input
{

	font-family: Trebuchet MS, Arial; font-size: 11px;
}


.headerLinks
{

	color: white; font-weight: bold;
}

.headerLinks:hover
{

	color: #FFFFFF;
}

input, textarea
{
	border: 1px solid; border-color: #BBBBBB; background-color: #F0F0F0;
}

textarea
{
	font-size: 12px;
}
</style>
<SCRIPT LANGUAGE="JavaScript">
function ClipBoard( area )
{
	holdtext.innerText = area.innerText;
	Copied             = holdtext.createTextRange();

	if ( Copied.execCommand("Copy") == true )
	{
		alert('Text copied to clipboard successfully');
	}
}

function openAddNoteWindow ( funcID )
{
	var w   = 500, h = 500;
	var top = ( screen.height - h ) / 2 - 15, left = ( screen.width - w ) / 2;

	if ( top < 0 )
	{
		top = 0;
	}

	if ( left < 0 )
	{
		left = 0;
	}

	window.open('index.php?a=addnote&f=' + funcID,
		    'AddNote',
		    'width=' + w + ',height=' + h + ',top=' + top + ', left=' + left + ',scrollbars=yes');
}
</SCRIPT>
<title>txtSQL Documentation Docs : Column Types</title>
</head>
<body bgcolor="FFFFFF" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0">

<table width="100%" cellspacing="0" cellpadding="3"
	<tr bgcolor="003265">
		<td><font color="white"><b>Column Types</b></font></td>
		<td align="right">
			<a href="javascript:history.back()" class="headerLinks">Back</a>
			<font color="white"> | <a href="javascript:history.forward()" class="headerLinks">Forward</a> |
			<a href="index.html" class="headerLinks">Home</a>
		</td>
	</tr>
	<tr>
		<td height="8" background="shadow.gif" colspan="2">
		</td>
	</tr>
</table>
<br />

<table width="95%" cellspacing="1" cellpadding="3" align="center">
	<tr valign="top">
		<td width="125" style="border:1px solid; border-color: #BBBBBB" bgcolor="#FAFAFA">
			<b><a href="1.html">'Language Reference'</a></b><br />
			<li><a href="2.html">Logical Operators</a></li><br />
			<li><a href="3.html">Relational Operators</a></li><br />
			<li><a href="4.html">Data Types</a></li><br />
			<li><b>Column Types</b></li><br />
			<li><a href="6.html">Primary Keys</a></li><br />
			<li><a href="7.html">Functions</a></li><br />
			<li><a href="8.html">Where Clauses</a></li><br />
			<li><a href="9.html">LIKE Clauses</a></li><br />
			<li><a href="10.html">Limit Clauses</a></li><br />
			<li><a href="11.html">OrderBy Clauses</a></li><br />
			<li><a href="12.html">Notes</a></li><br />
			<br />

			<a href="13.html">User Functions</a><br />
			<br />

			<a href="19.html">Database Functions</a><br />
			<br />

			<a href="28.html">Data Manipulation Functions</a><br />
			<br />

			<a href="34.html">Table Functions</a><br />
			<br />

			<a href="42.html">Error Handling Functions</a><br />

		<br />		</td>
		<td style="padding-left: 35px;">
			<table width="100%">
				<tr valign="bottom">
					<td align="left" width="33%"><< <a href="4.html">Last Section ( Data Types )</a></td>
					<td align="center" width="33%"><font size="6">Column Types</font></td>
					<td align="right" width="33%"><a href="6.html">Next Section ( Primary Keys )</a> >></td>
				</tr>
			</table>

			<hr size="1" color="#BBBBBB">

			When creating a table, there are multiple column types that you can choose from to customize that
			column. They can be any one of the following or more.<br /><br />
			
			
			<table width="100%" cellspacing="1" cellpadding="3" border="0" bgcolor="BBBBBB">
			    <tr bgcolor="fafafa" align="center">
			        <td><b>Name</b></td>
			        <td><b>Example</b></td>
			        <td><b>Description</b></td>
			    </tr>
			
			    <tr bgcolor="fefefe">
			        <td>auto_increment</td>
			        <td>array('auto_increment' => [0|1])</td>
			        <td>This columns increments itself automatically when inserting. This column must be of type
			            'int'.</td>
			    </tr>
			
			    <tr bgcolor="fefefe">
			        <td>max</td>
			        <td>array('max' => $maxLength)</td>
			        <td>This column type limits the length of the field to $maxLength. If the column is of type
			            integer, then the value will be checked against rather than the length</td>
			    </tr>
			
			    <tr bgcolor="fefefe">
			        <td>permanent</td>
			        <td>array('permanent' => [0|1])</td>
			        <td>This column type, when set to 1, does not allow it to be editable until set to 1 again</td>
			    </tr>
			
			    <tr bgcolor="fefefe">
			        <td>type</td>
			        <td>array('type' => [string|text|int|bool|date|enum])</td>
			        <td>see the <a href="4.html">data types</a> section</td>
			    </tr>
			
			    <tr bgcolor="fefefe">
			        <td>enum_val</td>
			        <td>array('enum_val' => array([$values]...))</td>
			        <td>This column type is only required when the column's type is set to enum. This is the list of
			            possible values in the column. The default value is always the trailing value. If the value
			            doesn't match any one of the enum_val's, then it will be replaced with the default value.</td>
			    </tr>
			
			    <tr bgcolor="fefefe">
			        <td>default</td>
			        <td>array('default' => $defaultValue)</td>
			        <td>This type allows txtSQL to know what the default value for a column is. txtSQL will use this value only when there
			            is no value for a column given to insert</td>
			    </tr>
			
			    <tr bgcolor="fefefe">
			        <td>primary</td>
			        <td>array('primary' => [0|1])</td>
			        <td>Tells txtSQL that this column is the primary column, when set to 1. There can only be one per table, and it must be
			            of type 'int' and has to be 'auto_increment'</td>
			    </tr>
			</table>

		<br /><br />			<table width="100%" cellspacing="1" cellpadding="3" border="0" bgcolor="D0D0D0" align="center">
				<tr>
					<td><font size="1">User-Contributed Comments for: </font><br><b>Column Types</b></td>
					<td align="right" valign="top"><a href="javascript: openAddNoteWindow('5');"> <font size="1" style="text-decoration:underline;"></font></a></td>
				</tr>
				<tr>
					<td colspan="2" align="center" bgcolor="#EBEBEB"><font face="courier new" size="2">No comments found; </font></td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<br />

</body>
</html>